import java.util.Objects;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:
 * Date: 2024-10-24
 * Time: 15:16
 */

class Person{
    public String id;

    public Person(String id){
        this.id = id;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Person person = (Person) o;
        return Objects.equals(id, person.id);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id);
    }
}
public class Test {
    public static void main1(String[] args) {
        Person person1 = new Person("1234");
        Person person2 = new Person("1234");

        /*System.out.println(person1.hashCode());
        System.out.println(person2.hashCode());

        System.out.println(person1.equals(person2));*/

        HashBuck2<Person,String> hashBuck2 = new HashBuck2<>();
        hashBuck2.push(person1,"xiaoming");

        System.out.println(hashBuck2.getVal(person2));
    }






    public static void main(String[] args) {
        HashBusk hashBusk = new HashBusk();
        hashBusk.push(1, 9);
        hashBusk.push(11, 9);
        hashBusk.push(14, 9);
        hashBusk.push(4, 9);
        hashBusk.push(2, 9);
        hashBusk.push(15, 9);
        hashBusk.push(6, 9);
        hashBusk.push(5, 9);

        //System.out.println(hashBusk.getVal(15));
    }
}
